package com.example.sxmall.dao.mapper;

import com.example.sxmall.dao.pojo.Admins;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminsMapper {
    /**
     * 查找用户
     * @param acount
     * @param apwd
     * @return
     */
    public Admins findAdminsByCountAndPwd(@Param("acount") String acount, @Param("apwd") String apwd);

    /**
     * 查看用户列表
     * @param
     * @return
     */
    public List<Admins> listAdmins();

    /**
     * 根据账号模糊查找用户
     * @param acount
     * @return
     */
    public List<Admins> findAdminsByCount(@Param("acount") String acount);

    /**
     * 根据ID查找用户
     * @param aid
     * @return
     */
    public Admins findAdminsById(@Param("aid") Integer aid);

    /**
     * 添加
     * @param admins
     * @return
     */
    public int insertAdmins(@Param("admins") Admins admins);

    /**
     * 删除
     * @param aid
     * @return
     */
    public int deleteAdmins(@Param("aid") Integer aid);

    /**
     * 修改
     * @param admins
     * @return
     */
    public int updateAdmins(@Param("admins") Admins admins);

    List<Admins> listByPerconId(Integer pctId);

    List<Integer> getNavPctIds(Integer adminsId);

    List<Integer> getNavPercontentsId(Integer adminsId);
}
